package com.orangelife.mobile.common.view;

import android.content.Context;
import android.util.AttributeSet;

import com.markupartist.android.widget.PullToRefreshListView;

/**
 * 可以嵌套ListView的下拉刷新列表
 * Created by wgf on 2016/5/19.
 * @author wgf
 * @since v3.6.5
 */
public class PullToRefreshScrollListView extends PullToRefreshListView{
    public PullToRefreshScrollListView(Context context) {
        super(context);
    }

    public PullToRefreshScrollListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public PullToRefreshScrollListView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    //限制子list的高度
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }


}
